import http from './http'
let root = ''
if (process.env.NODE_ENV === 'production') {
	root = location.href.indexOf('addons') > -1 ? '/addons/youmi_activitys/public/' : '/index.php'
	console.log("root", root)
} else {
	root = '/public/index.php'
	console.log("root", root)
}
// 合同
//export const pdfUrl = root + '/m/install/contract/'
// 审核员列表获取接口
// export const getAssistUserInfo = (params) => {
//   return http.fetchGet(api.getAssistUserInfo, params)
// }

export default {
	async getDomain(params) {
		return await http.fetchPost(root + "?s=App.Config.ItemShare", params)
	},
	// 获取分享图片
	async getActivityItembase64(params) {
		return await http.fetchPost(root + "?s=App.Activity.Itembase64", params)
	},
	async getFansItem(params) {
		return await http.fetchPost(root + "?s=App.Fans.Item", params)
	},
	async getOpenid(params) {
		return await http.fetchPost(root + "?s=App.Weixin.Weixin", params)
	},
	async orderRepay(params) {
		return await http.fetchPost(root + "?s=App.Order.Repay", params)
	},
	async configJssdk(params) {
		return await http.fetchPost(root + "?s=App.Config.Jssdk", params)
	},
	async getOrderItem(params) {
		return await http.fetchPost(root + "?s=App.Order.Item", params)
	},
	async getOrderSave(params) {
		return await http.fetchPost(root + "?s=App.Order.Save", params)
	},
	async getWeixinConfig(params) {
		return await http.fetchPost(root + "?s=App.Config.ItemWeixin", params)
	},
	async activityDel(params) {
		return await http.fetchPost(root + "?s=App.Activity.Del", params)
	},
	async activitySave(params) {
		return await http.fetchPost(root + "?s=App.Activity.Save", params)
	},
	async getActivityItem(params) {
		return await http.fetchPost(root + "?s=App.Activity.Item", params)
	},
	async getActivityPage(params) {
		return await http.fetchPost(root + "?s=App.Activity.Page", params)
	},
	async getSlidepicPage(params) {
		return await http.fetchPost(root + "?s=App.Slidepic.Page", params)
	},
	async getArticle(params) {
		return await http.fetchPost(root + "?s=App.Article.Item", params)
	},
	async getMerchantItem(params) {
		return await http.fetchPost(root + "?s=App.Merchant.Item", params)
	},
	async getMerchantPage(params) {
		return await http.fetchPost(root + "?s=App.Merchant.Page", params)
	},
	async saveMerchant(params) {
		return await http.fetchPost(root + "?s=App.Merchant.Save", params)
	},
	async updateCase(params) {
		return await http.fetchPost(root + "?s=App.Cases.Save", params)
	},
	async getCaseById(params) {
		return await http.fetchPost(root + "?s=App.Cases.Item", params)
	},
	async getCaseType(params) {
		return await http.fetchGet(root + "?s=App.Casetype.Page", params)
	},
	async getCaseList(params) {
		return await http.fetchPost(root + "?s=App.Cases.Page", params)
	},
	async getArticleList(params) {
		return await http.fetchGet(root + "?s=App.Article.Page", params)
	},
	async getTabbar(params) {
		return await http.fetchGet(root + "?s=App.Config.Items", params)
	},
	async ConfigItem(params) {
		return await http.fetchGet(root + "?s=App.Config.Item", params)
	},
	uploadPic(params) {
		return http.fetchPostForUpload(root + "?s=App.Examples_Upload.Go", params)
	},

	// 查询团员显示
	async groupPage(params) {
		return await http.fetchPost(root + "?s=App.Group.Page", params)
	},

	// 查询我的团
	// async groupBody(params){
	// 	return await http.fetchPost(root + "?s=App.Group.PageGroup", params)
	// },

	// 创建订单
	// async savaOrder(params){
	// 	return await http.fetchPost(root + "?s=App.Group.SavaOrder", params)
	// },

	// 查询订单列表
	async getMyOrder(params) {
		return await http.fetchPost(root + "?s=App.Group.MyOrder", params)
	},

	// 抽奖查询
	async pagePrize(params) {
		return await http.fetchPost(root + "?s=App.Prize.PagePrize", params)
	},

	// 抽奖
	async doDraw(params) {
		return await http.fetchPost(root + "?s=App.Prize.DoDraw", params)
	},

	// 活动地址
	async savaAddress(params) {
		return await http.fetchPost(root + "?s=App.Prize.SavaAddress", params)
	},

	// 我的礼品
	async prizeList(params) {
		return await http.fetchPost(root + "?s=App.Prize.PrizeList", params)
	},

	// 查询分享
	async itemsHelp(params) {
		return await http.fetchPost(root + "?s=App.Prize.ItemsHelp", params)
	},

	// 邀请好友助力
	async receivingHelp(params) {
		return await http.fetchPost(root + "?s=App.Prize.Receiving_help", params)
	},

	// 抽中滚动 
	async scrollList(params) {
		return await http.fetchPost(root + "?s=App.Prize.ScrollList", params)
	},

	// 助力排行 
	async helpsList(params) {
		return await http.fetchPost(root + "?s=App.Prize.HelpsList", params)
	},

	// 获取活动列表
	async getPageActItem(params) {
		return await http.fetchPost(root + "?s=App.Group.PageActItem", params)
	},

	// 我要开团
	async getSavaOrder(params) {
		return await http.fetchPost(root + "?s=App.Group.SavaOrder", params)
	},

	// 立即参团列表 
	async getInGroup(params) {
		return await http.fetchPost(root + "?s=App.Group.InGroup", params)
	},

	// 立即参团 
	async getSavaMam(params) {
		return await http.fetchPost(root + "?s=App.Group.SavaMam", params)
	},

	// 分享拼团 邀请好友 1
	async getInvitation(params) {
		return await http.fetchPost(root + "?s=App.Group.Invitation", params)
	},

	// 红包排行  1
	async getGiftsRanking(params) {
		return await http.fetchPost(root + "?s=App.Group.GiftsRanking", params)
	},

	// 佣金排行榜 1
	async getCommissionRanking(params) {
		return await http.fetchPost(root + "?s=App.Group.CommissionRanking", params)
	},

	// 参加的团 1
	async getPageGroup(params) {
		return await http.fetchPost(root + "?s=App.Group.PageGroup", params)
	},

	// 删除退款订单 1
	async getDelRefund(params) {
		return await http.fetchPost(root + "?s=App.Group.DelRefund", params)
	},

	// 查询可加入的团 1
	async getPageActivity(params) {
		return await http.fetchPost(root + "?s=App.Group.PageActivity", params)
	},

	// 拼团失败 订单退款 
	async getGroupRefund(params) {
		return await http.fetchPost(root + "?s=App.Group.Refund", params)
	},

	// 拼团成功和失败退款 1
	async getRefundOrder(params) {
		return await http.fetchPost(root + "?s=App.Group.RefundOrder", params)
	},

	// 个人红包和佣金查询 1
	async getGiftsWithdrawal(params) {
		return await http.fetchPost(root + "?s=App.Group.GiftsWithdrawal", params)
	},

	// 个人佣金明细查询 1
	async getGroupCommission(params) {
		return await http.fetchPost(root + "?s=App.Group.Commission", params)
	},

	// 个人红包明细查询 1
	async getGroupMyGifts(params) {
		return await http.fetchPost(root + "?s=App.Group.MyGifts", params)
	},

	// 红包拓客支付
	async getOrderHBTKorder(params) {
		return await http.fetchPost(root + "?s=App.Order.HBTKorder", params)
	},

	// 红包拓客订单
	async getOrderpage(params) {
		return await http.fetchPost(root + "?s=App.Prize.Orderpage", params)
	},

	// 红包拓客重新支付
	async getOrderRepay(params) {
		return await http.fetchPost(root + "?s=App.Order.Repay", params)
	},

	// 退款
	async getOrderRefunds(params) {
		return await http.fetchPost(root + "?s=App.Order.Refunds", params)
	},

	// 删除订单
	async getOrderDel(params) {
		return await http.fetchPost(root + "?s=App.Order.Del", params)
	},

	// 订单记录
	async getPrizeHBTKorder(params) {
		return await http.fetchPost(root + "?s=App.Prize.HBTKorder", params)
	},

	// 浏览记录
	async getPrizeHBTKvisit(params) {
		return await http.fetchPost(root + "?s=App.Prize.HBTKvisit", params)
	},

	// 分享
	async getInvitations(params) {
		return await http.fetchPost(root + "?s=App.Group.Invitations", params)
	},

	// 获取虚拟数据
	async getAvatarPage(params) {
		return await http.fetchPost(root + "?s=App.Avatar.Page", params)
	},

	// 佣金排行明细查询 
	async getGroupCommissionRank(params) {
		return await http.fetchPost(root + "/?s=App.Group.CommissionRank", params)
	},

	// 个人佣金查询 1
	async getGiftsWithdrawals(params) {
		return await http.fetchPost(root + "?s=App.Group.GiftsWithdrawals", params)
	},

	// 提现
	async getGroupWithdrawals(params) {
		return await http.fetchPost(root + "?s=App.Group.Withdrawals", params)
	},

	// 音乐播放
	async getMusicPage(params) {
		return await http.fetchPost(root + "?s=App.Music.Page", params)
	},

	// 获取优惠券接口
	async CouponFans(params) {
		return await http.fetchPost(root + "?s=App.CouponFans.Save", params)
	},
	// 查询粉丝是否领取过优惠券活动
	async CouponFansItems(params) {
		return await http.fetchPost(root + "?s=App.CouponFans.Items", params)
	},
	// 优惠券列表
	async CouponFansPage(params) {
		return await http.fetchPost(root + "?s=App.CouponFans.Page", params)
	},
	// 查询自己助力次数
	async getActivityFansItems(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.Items", params)
	},
	// 抽奖
	async getDoDraws(params) {
		return await http.fetchPost(root + "?s=App.Prize.doDraws", params)
	},
	// 判断是否已经领取奖品
	async getPrizeorder(params) {
		return await http.fetchPost(root + "?s=App.Prize.Prizeorder", params)
	},
	// 添加砍价报名信息
	async getKJorder(params) {
		return await http.fetchPost(root + "?s=App.Order.KJorder", params)
	},
	// 查看砍价是否已报名
	async getFansItema(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.Itema", params)
	},
	// 砍自己一刀
	async getFansMyKJ(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.MyKJ", params)
	},
	// 帮好友砍价
	async getReceivingHelps(params) {
		return await http.fetchPost(root + "?s=App.Prize.receiving_helps", params)
	},
	// 查询商家信息
	async getMerchantItema(params) {
		return await http.fetchPost(root + "?s=App.Merchant.Itema", params)
	},
	// 查询投票信息
	async getVotePage(params) {
		return await http.fetchPost(root + "?s=App.Vote.Page", params)
	},
	// 给粉丝投票
	async getVoteFansSave(params) {
		return await http.fetchPost(root + "?s=App.VoteFans.Save", params)
	},
	// 查询自己剩余助力的时间
	async getOrderSelorders(params) {
		return await http.fetchPost(root + "?s=App.Order.Selorders", params)
	},
	// 砍价的支付
	async getKJZForder(params) {
		return await http.fetchPost(root + "?s=App.Order.KJZForder", params)
	},
	// 参与人的助力次数
	async getFansItemss(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.Itemss", params)
	},
	// 获取砍价的订单信息
	async getOrderpages(params) {
		return await http.fetchPost(root + "?s=App.Prize.Orderpages", params)
	},
	// 
	async getItemKGZF(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.ItemKGZF", params)
	},
	// 
	async getInsertfans(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.Insertfans", params)
	},
	//  
	async getItemsdda(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.Itemsdda", params)
	},
	// 是否砍过
	async getFansitemSFKYBK(params) {
		return await http.fetchPost(root + "?s=App.ActivityFans.itemSFKYBK", params)
  },
  // 投票报名
	async getTPorder(params) {
		return await http.fetchPost(root + "?s=App.Order.TPorder", params)
	},
	// 更新投票数量 
    async getVoteFansUpall(params) {
		return await http.fetchPost(root + "?s=App.VoteFans.Upall", params)
	},
	
	// 查询是否报过名
    async getVoteItems(params) {
		return await http.fetchPost(root + "?s=App.Vote.Items", params)
	},
	
	// 获取商品数据
	async getProductPage(params) {
		return await http.fetchPost(root + '?s=App.Product.Page', params)
	},
	// 获取商品数据
	async getProductPage(params) {
		return await http.fetchPost(root + '?s=App.Product.Page', params)
	},
	// 获取购买商品总价格 ?s=App.Order.DSPorder
	async getProductItemsum(params) {
		return await http.fetchPost(root + '?s=App.Product.Itemsum', params)
	},
	// 多商品接龙支付
	async getOrderDSPorder(params) {
		return await http.fetchPost(root + '?s=App.Order.DSPorder', params)
	},
	// 支付完毕的详细信息(发货)
	async getOrderdeliveryPages(params) {
		return await http.fetchPost(root + '?s=App.Orderdelivery.Pages', params)
	},
	// 支付完毕的详细信息(自提)
	async getOrderSelfPage(params) {
		return await http.fetchPost(root + '?s=App.OrderSelf.Page', params)
	},
}